package BasicClass.One;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BasicOne20 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        int size = Integer.parseInt(s[0]);
        int target = Integer.parseInt(s[1]);
        String[] nums = reader.readLine().split(" ");
        int[] arr = new int[size];
        for (int i = 0; i < size; i++) {
            arr[i]=Integer.parseInt(nums[i]);
        }
        BasicOne20 one20 = new BasicOne20();
        System.out.println(one20.Main(arr, target)+1);
    }

    /**
     *请实现有重复数字的有序数组的二分查找。
     * 输出在数组中第一个大于等于查找值的位置，如果数组中不存在这样的数，则输出数组长度加一。
     * @return
     */
    public int Main(int[] arr,int target){
        if(arr[arr.length-1]<target){
            return arr.length;
        }
        if(arr[0]>=target){
            return 0;
        }
        int left = 0;
        int right = arr.length-1;
        while (left<right){
            int mid = left+((right-left)>>1);
            if(arr[mid]>=target){
                right = mid;
            }else {
                left = mid+1;
            }
        }
        while (right>0 && arr[right]>=target){
            right--;
        }
        return right+1;
    }
}
